﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.DataAccess;
using System.IO;

namespace University.Workshop.Business
{
    public static class ManagerBackUp
    {
        public static void CreateBackUp(string dir,string file)
        {
            if(DataAccessBackUp.BackUpExist(Path.Combine(dir,file)))
            {
                DataAccessBackUp.DeleteBackUp(Path.Combine(dir, file));
            }
            DataAccessBackUp.CreateBackUp(dir, file);
        }

        public static bool ExistBackUp(string dir)
        {
            return DataAccessBackUp.BackUpExist(dir);
        }

        public static bool ExistDatabase()
        {

            return DataAccessBackUp.ExistDataBase();
        }

        public static void MakeBackUp(string p)
        {
            DataAccessBackUp.MakeBackUp(p);
        }
    }
}
